package com.zq.solr.util;

import org.springframework.data.solr.core.mapping.SimpleSolrMappingContext;

/**
 * Created by system.out on 2017/3/17.
 */
public class SolrUtils {

    public static String getSolrCoreName(Class clazz){
        SimpleSolrMappingContext simpleSolrMappingContext  = new SimpleSolrMappingContext();
        return simpleSolrMappingContext.getPersistentEntity(clazz).getSolrCoreName();
    }
}
